<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	Integer adminUsergrade = (Integer) session.getAttribute("adminUsergrade");
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>随便打TCS系统</title>
<script type="text/javascript" src="<%=basePath%>js/initPage.js"></script>
<!-- Bootstrap -->
<link href="<%=basePath%>vendors/bootstrap/dist/css/bootstrap.min.css"
	rel="stylesheet">
<!-- Font Awesome -->
<link
	href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
	rel="stylesheet">
<!-- NProgress -->
<link href="<%=basePath%>vendors/nprogress/nprogress.css"
	rel="stylesheet">
<!-- iCheck -->
<link href="<%=basePath%>vendors/iCheck/skins/flat/green.css"
	rel="stylesheet">

<!-- bootstrap-progressbar -->
<link
	href="<%=basePath%>vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css"
	rel="stylesheet">
<!-- JQVMap -->
<link href="<%=basePath%>vendors/jqvmap/dist/jqvmap.min.css"
	rel="stylesheet" />
<!-- bootstrap-daterangepicker -->
<link
	href="<%=basePath%>vendors/bootstrap-daterangepicker/daterangepicker.css"
	rel="stylesheet">

<!-- Custom Theme Style -->
<link href="<%=basePath%>build/css/custom.min.css" rel="stylesheet">






<!-- bootstrap-wysiwyg -->
<link
	href="<%=basePath%>vendors/google-code-prettify/bin/prettify.min.css"
	rel="stylesheet">
<!-- Select2 -->
<link href="<%=basePath%>vendors/select2/dist/css/select2.min.css"
	rel="stylesheet">
<!-- Switchery -->
<link href="<%=basePath%>vendors/switchery/dist/switchery.min.css"
	rel="stylesheet">
<!-- starrr -->
<link href="<%=basePath%>vendors/starrr/dist/starrr.css"
	rel="stylesheet">


</head>

<body class="nav-md">
	<div class="container body">
		<div class="main_container">
			<div class="col-md-3 left_col">
				<div class="left_col scroll-view">
					<div class="clearfix"></div>
					<br />
				</div>
			</div>



			<!-- page content -->
			<div class="right_col" role="main">
				<div class="">
					<div class="page-title">
						<div class="title_left"><h3>确认订单</h3></div>
					</div>


					<div class="x_panel">

						<div class="x_content">

							<table id="datatable" class="table table-striped table-bordered">

                                <thead>
									<tr>
										<th>订单编号</th>
										<th>创建时间</th>
										<th>付款金额</th>
										<th>佣金金额</th>
										<th>广告位ID</th>
										<th>广告位名称</th>
			
									</tr>
								</thead>


								<tbody id="shopAliOrder">
									<c:forEach items="${shopAliOrder}" var="s" varStatus="z">
										<tr>
										    <td>${s.ordernum}</td>
										    <td><fmt:formatDate value="${s.createtime}" type="date"
													pattern="yyyy-MM-dd" /></td>
										    <td>${s.jsmoney}</td>
										    <td>${s.yjmoney}</td>
										    <td>${s.userid}</td>
										    <td>${s.agentid}</td>
										   
										   <!-- <td><input id="ordernum" type="text" value="${s.ordernum}"></td>
										    <td><input id="createtime" type="text" value="${s.createtime}"></td>
										    <td><input id="jsmoney" type="text" value="${s.jsmoney}"></td>
										    <td><input id="yjmoney" type="text" value="${s.yjmoney}"></td>
										    <td><input id="userid" type="text" value="${s.userid}"></td>
										    <td><input id="agentid" type="text" value="${s.agentid}"></td> --> 
										</tr>
									</c:forEach>
								</tbody>
							</table>
							<div class="ln_solid"></div>
										
						</div>
					</div>
					<div class="clearfix"></div>
					<div class="form-group">
					   <div class="col-md-6 col-md-offset-3">
							<a type="submit" class="btn btn-primary"
							onclick="taobaodingdan()">取消</a> 
							<input id="revise" type="button" class="btn btn-success"
							href="javascript:void(0)"  onclick="ajaxPost() "   value="确定">
					   </div>
					</div>
					<br />
				</div>
				<div style="width: 100%;text-align: center;">
					<div id='page'></div>
				</div>
			</div>
		</div>
	</div>
 
    <script src="<%=basePath%>vendors/jquery/dist/jquery.min.js"></script>
    <!--<script type="text/javascript">
     function al() {
    	 var orderObj={ordernum:"",createtime:"",jsmoney:"",yjmoney:""};
    	 
    	 var a = JSON.parse("{\"title\":\"\",\"data\":[]}");
    	 
    	 var tb= document.getElementById("shopAliOrder");
    	 var rows = tb.rows.length; //获得行数
    	 var colums = tb.rows[0].cells.length; //获得列数 
    	 if(rows > 0){
    		 for (var i = 1; i < rows; i++) { //每行 从第二行开始因为第一行是表格的标题
    			 var orderObj = new Object();
    			 orderObj.ordernum = tb.rows[i].cells[0].innerHTML;
    			 orderObj.createtime = tb.rows[i].cells[1].innerHTML;
    			 orderObj.jsmoney = tb.rows[i].cells[2].innerHTML;
    			 orderObj.yjmoney = tb.rows[i].cells[3].innerHTML;
    			 a.data.add(orderObj)
    		 }
    	 }
    	 alert(orderObj);
	}
    </script>-->

	<script type="text/javascript">
        function taobaodingdan() {
        	location.href = "content_taobaodingdan";
		}	
	
		// ajax 对象
		function ajaxObject() {
			var xmlHttp;
			try {
				// Firefox, Opera 8.0+, Safari
				xmlHttp = new XMLHttpRequest();
			} catch (e) {
				// Internet Explorer
				try {
					xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					try {
						xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
					} catch (e) {
						alert("您的浏览器不支持AJAX！");
						return false;
					}
				}
			}
			return xmlHttp;
		}
		
		function ajaxPost() {
			var ajax = ajaxObject();
			ajax.open("post", "insertShopAliOrder", true);
			ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			ajax.onreadystatechange = function() {
				if (ajax.readyState == 4) {
					if (ajax.status == 200) {
						var result = ajax.responseText;
							alert(result);
							location.href = "content_taobaodingdan";
					} else {
						//请求失败
						alert("请求终止，请检查操作或联系客服咨询" + ajax.status);
					}
				} else {
				}
			};
			ajax.send();
		}
	</script>

	<!-- jQuery -->
	<script src="<%=basePath%>vendors/jquery/dist/jquery.min.js"></script>
	<!-- Bootstrap -->
	<script src="<%=basePath%>vendors/bootstrap/dist/js/bootstrap.min.js"></script>
	<!-- FastClick -->
	<script src="<%=basePath%>vendors/fastclick/lib/fastclick.js"></script>
	<!-- NProgress -->
	<script src="<%=basePath%>vendors/nprogress/nprogress.js"></script>
	<!-- bootstrap-daterangepicker -->
	<script src="<%=basePath%>vendors/moment/min/moment.min.js"></script>
	<script
		src="<%=basePath%>vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
	<!-- Chart.js -->
	<script src="<%=basePath%>vendors/Chart.js/dist/Chart.min.js"></script>
	<!-- Custom Theme Scripts -->
	<script src="<%=basePath%>build/js/custom.min.js"></script>
	<!-- iCheck -->
	<script src="<%=basePath%>vendors/iCheck/icheck.min.js">
	</script>
	<!-- bootstrap-wysiwyg -->
	<script
		src="<%=basePath%>vendors/bootstrap-wysiwyg/js/bootstrap-wysiwyg.min.js"></script>
	<script src="<%=basePath%>vendors/jquery.hotkeys/jquery.hotkeys.js"></script>
	<script src="<%=basePath%>vendors/google-code-prettify/src/prettify.js"></script>
	<!-- jQuery Tags Input -->
	<script
		src="<%=basePath%>vendors/jquery.tagsinput/src/jquery.tagsinput.js"></script>
	<!-- Switchery -->
	<script src="<%=basePath%>vendors/switchery/dist/switchery.min.js"></script>
	<!-- Select2 -->
	<script src="<%=basePath%>vendors/select2/dist/js/select2.full.min.js"></script>
	<!-- Parsley -->
	<script src="<%=basePath%>vendors/parsleyjs/dist/parsley.min.js"></script>
	<!-- Autosize -->
	<script src="<%=basePath%>vendors/autosize/dist/autosize.min.js"></script>
	<!-- jQuery autocomplete -->
	<script
		src="<%=basePath%>vendors/devbridge-autocomplete/dist/jquery.autocomplete.min.js"></script>
	<!-- starrr -->
	<script src="<%=basePath%>vendors/starrr/dist/starrr.js"></script>
	<!-- layui -->
	<script src="<%=basePath%>vendors/layui/layui.js"></script>
	

</body>
</html>